<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>礼品列表</title>
    <%@include file="/WEB-INF/views/commons/commons.jsp" %>
    <script type="text/javascript" src="/static/js/system/gift.js"></script>
    <style>
        .easyui-textbox {
            width: 165px;
        }

        .easyui-numberbox {
            width: 165px;
        }

        .easyui-combobox {
            width: 165px;
        }
    </style>
</head>
<body>
<table id="gift_datagrid"></table>

<!-- 表格顶部工具栏 -->
<div id="tb">
    <shiro:hasPermission name="gift:save">
        <a href="#" class="easyui-linkbutton"
           data-options="iconCls:'icon-add',plain:true" data-cmd="add">新增</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="gift:update">
        <a href="#" class="easyui-linkbutton"
           data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="gift:delete">
        <a href="#" class="easyui-linkbutton"
           data-options="iconCls:'icon-remove',plain:true" data-cmd="remove">删除</a>
    </shiro:hasPermission>
    <a href="#" class="easyui-linkbutton"
       data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input class="easyui-textbox" name="keyword" id="keyword" prompt="请输入礼品名称或编码">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true"
       data-cmd="query">查询</a>
</div>

<!-- 新增编辑dialog -->
<div id="gift_dialog" style="width: 320px;height: 850px">
    <center>
        <form method="post" id="gift_form" style="padding: 10px 10px 10px 10px;">
            <input type="hidden" id="giftId" name="id">
            <table style="border-collapse: separate; border-spacing: 10px">
                <tr>
                    <td>礼品编号:</td>
                    <td>
                        <input class="easyui-textbox" name="sn" data-options="required:'true',prompt:'请输入礼品编号'">
                    </td>
                </tr>
                <tr>
                    <td>礼品名称:</td>
                    <td>
                        <input class="easyui-textbox" name="name" data-options="required:'true',prompt:'请输入礼品名称'">
                    </td>
                </tr>
                <tr>
                    <td>所需积分:</td>
                    <td>
                        <input class="easyui-numberbox" name="integral"
                               data-options="required:'true',prompt:'请输入所需积分',min:0,precision:0">
                    </td>
                </tr>
                <tr>
                    <td>礼品数量:</td>
                    <td>
                        <input class="easyui-numberbox" name="number"
                               data-options="required:'true',prompt:'请输入数量',min:0,precision:0">
                    </td>
                </tr>
                <tr>
                    <td>礼品单位</td>
                    <td><input class="easyui-combobox" type="text" name="unit"
                               data-options="valueField: 'unit',textField: 'label', panelHeight:'auto',
                    data: [{
                            label: '包',
                            unit: '包'
                        },{
                            label: '条',
                            unit: '条'
                        },{
                            label: '个',
                            unit: '个'
                        },{
                            label: '瓶',
                            unit: '瓶'
                        },{
                            label: '箱',
                            unit: '箱'
                        },{
                            label: '斤',
                            unit: '斤'
                        },{
                            label: '件',
                            unit: '件'
                        }]"/></td>
                </tr>

            </table>
        </form>
    </center>
</div>

<!-- 新增编辑底部按钮 -->
<div id="bb">
    <a href="#" class="easyui-linkbutton"
       data-options="iconCls:'icon-save',plain:true"
       data-cmd="save">保存</a> <a
        href="#" class="easyui-linkbutton"
        data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel">取消</a>
</div>
</body>
</html>
